package com.observable.test2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @create 2020-09-15 22:12
 */
public class MouseEventTest {
    public static void main(String[] args) {
        MouseEventCallback callback = new MouseEventCallback();
        // 注册事件
        Mouse mouse = new Mouse();
        mouse.addListener(MouseEventType.ON_CLICK, callback);
        mouse.addListener(MouseEventType.ON_MOVE, callback);
        mouse.addListener(MouseEventType.ON_WHEEL, callback);
        mouse.addListener(MouseEventType.ON_OVER, callback);

        // 调用方法
        mouse.click();
        mouse.blur();
    }
}
